package com.itheima.controller;

import com.itheima.domain.pojo.PageResult;
import com.itheima.domain.query.LogQueryParam;
import com.itheima.domain.vo.Result;
import com.itheima.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Sch
 * @Date: 2025/07/18 16:28
 * @Description:
 */
@Slf4j
@RestController
@RequestMapping("/log")
public class LogController {

    @Autowired
    private LogService logService;


    @GetMapping("/page")
    public Result page(LogQueryParam logQueryParam) {
        log.info("查询请求参数： {}", logQueryParam);
        PageResult pageResult = logService.page(logQueryParam);
        return Result.success(pageResult);

    }

}
